﻿@{
    ViewBag.Title = "消耗计划";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@section scripts{
        <script src="~/Areas/Pacm/js/Pacm.Xhjh.js"></script>
        <script type="text/javascript">
            var data = @Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(Model));
            ko.bindingViewModel(new viewModel(data));
        </script>
}
        <div class="z-toolbar">
            <a id="a_refresh" href="#" plain="true" class="easyui-linkbutton" icon="icon-arrow_refresh" title="刷新" data-bind="click:refreshClick">刷新</a>
            <a id="a_add"    href="#" plain="true" class="easyui-linkbutton" icon="icon-add" title="新增" data-bind="click:addClick">新增</a>
            <a id="a_edit"   href="#" plain="true" class="easyui-linkbutton" icon="icon-edit" data-bind="click:editClick" title="编辑">编辑</a>
            <a id="a_del"    href="#" plain="true" class="easyui-linkbutton" icon="icon-cross" title="删除" data-bind="click:deleteClick">删除</a>
            <a id="a_audit"  href="#" plain="true" class="easyui-linkbutton" icon="icon-user-accept" data-bind="click:auditClick" title="审核">审核</a>
            <a id="a_down"  href="#" plain="true" class="easyui-linkbutton" icon="icon-user-accept" data-bind="click:downClick" title="下载">下载</a>

        </div>
        <div id="condition" class="container_12" style="position:relative;">
            <div class="grid_1 lbl">计划年份</div>
            <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.yearsItems ,comboboxValue:form.Xhjh_Year" class="z-txt easyui-combobox" data-options="showblank:true"/></div>
            <div class="grid_1 lbl">计划月份</div>
            <div class="grid_2 val"><input type="text" data-bind="datasource:dataSource.monthItems ,comboboxValue:form.Xhjh_Month" class="z-txt easyui-combobox" data-options="showblank:true"/></div>

            <div class="clear"></div>
            <div class="grid_1 lbl">录入日期</div>
            <div class="grid_2 val"><input type="text" data-bind="value:form.Xhjh_UpdateDate" class="z-txt easyui-daterange"/></div>
            <div class="clear"></div>
            <div class="prefix_9" style="position:absolute;top:5px;height:0;">  
                <a id="a_search" href="#" class="button button-blue" style="margin:0 15px;" data-bind="click:searchClick">查询</a> 
                <a id="a_reset" href="#" class="button button-blue" data-bind="click:clearClick">清空</a>
            </div>
        </div>
  
        <table id="gridlist" data-bind="datagrid:grid">
             <thead>  
                <tr>  
                    <th field="Xhjh_BillNo"rowspan="3"   sortable="true" align="left"    width="90" >单据编号</th>  
                    <th field="Xhjh_Year"  rowspan="3"   sortable="true" align="left"    width="60" >计划年度</th>  
                    <th field="Xhjh_Month" rowspan="3    sortable="true" align="left"    width="60" >计划月份</th>  
                    <th field="Xhjh_Tdts"  rowspan="3"   sortable="true" align="right"   width="70" >通电台数</th>  
                    <th field="Xhjh_Qdts"  rowspan="3"   sortable="true" align="right"   width="70" >启动台数</th>  
                    <th field="Xhjh_Czys"  rowspan="3"   sortable="true" align="right"   width="70" >槽昼夜数</th> 
                    <th field="Xhjh_Ylcl"  rowspan="3"   sortable="true" align="right"   width="70" >原铝产量</th>  
                    <th colspan="2">原铝分配计划</th>
                    <th colspan="1">阳极组用量</th>
                    <th colspan="8">主要原辅材料消耗</th>
                    <th field="CreateDate"   rowspan="3"  sortable="true" align="center" width="70"  formatter="com.formatDate"    >编制日期   </th>  
                    <th field="CreatePerson" rowspan="3"  sortable="true" align="left"   width="70" >编制人</th>   
                    <th field="Xhjh_Remark"  rowspan="3"  sortable="true" align="left"   width="70" >备注</th>   
                </tr>       
                <tr>
                    <th field="Xhjh_JhLdys"  rowspan="2"   sortable="true" align="center"   width="70" >铸锭原铝</th>  
                    <th field="Xhjh_jhJtys"  rowspan="2"   sortable="true" align="center"   width="70" >外售嘉通原铝</th>   
                    <th field="Xhjh_Yjzyl"   rowspan="2"   sortable="true" align="center"   width="70" >生产使用（阴极组）</th> 
                    <th colspan="2">供电量</th>
                    <th colspan="1">氧化铝</th>
                    <th colspan="1">阳极炭块</th>
                    <th colspan="2">生产使用氟化盐</th>
                    <th colspan="1">冰晶石</th>
                    <th colspan="1">新启动槽</th>
                </tr>  
                <tr>
                    <th field="Xhjh_Djscyd" rowspan="1"   sortable="true" align="center"    width="70" >电力生产</th>
                    <th field="Xhjh_Dlyd"   rowspan="1"   sortable="true" align="center"    width="70" >动力用电</th>

                    <th field="Xhjh_Yhl_Scsy"  rowspan="1" sortable="true" align="center"   width="70" >生产使用(氧化铝)</th>
                   
                    <th field="Xhjh_Yjtk_Scsy"  rowspan="1" sortable="true" align="center"  width="70" >生产使用(阴极炭块)</th>
                    
                    <th field="Xhjh_Fhy_Yhl"   rowspan="1"  sortable="true" align="center"  width="70" >氟化铝</th>
                    <th field="Xhjh_Fhy_Bjs"   rowspan="1"  sortable="true" align="center"  width="70" >冰晶石(低）</th>
                    <th field="Xhjh_Psqd_Bjs"  rowspan="1"  sortable="true" align="center"  width="70" >焙烧启动</th>
                   
                    <th field="Xhjh_Psqd_Bwcl" rowspan="1" sortable="true" align="center"   width="70" >焙烧启动</th>
                </tr>                   
            </thead>      
        </table> 
 